/**
 * 
 */
package net.fancy.main;

import net.fancy.util.Constants;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 * @author fancylou
 *
 */
public class AlarmActivity extends Activity  {

	private Button savebtn;
	
	/* (non-Javadoc)
	 * @see android.app.Activity#onCreate(android.os.Bundle)
	 */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.newalarm);
		
		//获取传值
		Bundle extras = getIntent().getExtras();
		String out = "";
		if(extras!=null){
			out = extras.getString("ItemType");
			Log.d(Constants.FANCY_LOG, out);
		}
		
		savebtn = (Button) findViewById(R.id.savealarm);
		savebtn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				/**
				 * 测试代码
				 */
				Bundle bundle = new Bundle();
				bundle.putString("store", "数据来自Alarm");
				Intent mIntent = new Intent();
				mIntent.putExtras(bundle);
				setResult(RESULT_OK,mIntent);
				finish();
			}
		});
		
	}
	
	

	
}
